//
//  BIDShowPhotoView.h
//  党务通
//
//  Created by mal on 13-11-21.
//  Copyright (c) 2013年 mal. All rights reserved.
//

#import <UIKit/UIKit.h>

@class BIDCustomSpinnerView;

@protocol BIDShowPhotoViewDelegate <NSObject>

- (void)changeStatusForStatusBar:(NSInteger)type;

@end

@interface BIDShowPhotoView:UIView<UIScrollViewDelegate>

@property (strong, nonatomic) UIButton *addPhotoBtn;
@property (strong, nonatomic) UILabel *label;
@property (strong, nonatomic) NSMutableArray *imgViewArray;
@property (strong, nonatomic) UIView *photoView;
@property (strong, nonatomic) UIPageControl *pageControl;
@property (assign, nonatomic) BOOL bLeftToRight;
@property (strong, nonatomic) id<BIDShowPhotoViewDelegate> delegate;
//滚动视图是否还有速度
@property (assign, nonatomic) BOOL bSpeed;
@property (assign, nonatomic) CGFloat oldPosX;

//最多允许的图片数
@property (assign, nonatomic) int photoCount;
//是否具有保存功能
@property (assign, nonatomic)BOOL bCanSave;
//是否具有删除功能
@property (assign, nonatomic)BOOL bCanDelete;
//是否需要缩放
@property (assign, nonatomic)BOOL bNeedScale;
//原图
@property (strong, nonatomic)NSMutableArray *originalImgArr;

//
@property (strong, nonatomic)BIDCustomSpinnerView *spinnerView;

//
@property (strong, nonatomic)UIScrollView *imageScrollView;

@property (assign, nonatomic)NSInteger lastPage;

- (void)addPhoto:(UIImage*)img;

- (void)initView;

- (void)imgViewTap:(UITapGestureRecognizer*)sender;
- (void)photoViewTap:(UITapGestureRecognizer*)sender;
- (void)deletePhoto:(UIButton*)sender;
- (void)savePhoto;
- (void)savePhotoToAlbum:(UIImage*)image didFinishSavingWithError:(NSError*)err contextInfo:(void*)contextInfo;

@end
